#include "Mesh.h"

Mesh::Mesh():_mesh(0)
{}

void Mesh::add(Objet3D *o, float*pos)
{
    _mesh.push_back(o);
    o->translate(pos);
}

Objet3D *Mesh::operator[](unsigned int i) const
{
    if (i < _mesh.size())
	return _mesh[i];
    else throw "Hors du vecteur";
}

Objet3D * & Mesh::operator[](unsigned int i)
{
    if (i < _mesh.size())
	return _mesh[i];
    else throw "Hors du vecteur";
}

unsigned int Mesh::size()
{
	return _mesh.size();
}
